<template>
  <el-dialog title="页面预览" v-model="show" width="90%" :append-to-body="true" :close-on-press-escape="true"
             :close-on-click-modal="true">
    <div class="previewPanel" v-if="show">
      <vb-table :option="option" ref="table"></vb-table>
    </div>
  </el-dialog>
</template>

<script>
export default {
  mixins: [],
  components: {
  },
  data() {
    return {
      option: null,
      show: false
    }
  },
  props: {},
  setup() {
  },
  mounted() {
  },
  methods: {
    /**
     * 打开对话框
     */
    open(param) {
      this.show = true
      this.option = JSON.parse(JSON.stringify(param.option))
      this.option.height = 500
    },
    /**
     * 关闭对话框
     */
    close() {
      this.show = false
    }
  },
  watch: {}
}
</script>
<style scoped lang="scss">
.previewPanel{
  width: 100%;
  min-height: 400px;
}
</style>
